<?php

/* Web Statistics and Analytics Console (PHP)
 *  view_stats.php
 *  Author: Trevor Bidyk
 *  Created: January 1, 2000
 *  Last modified: April 2, 2011
 *   (C) Us 2011
 *   Uses Simple PHP Framework, licensed under the FreeBSD license.
 *    View license in ./include/LICENSE.
 *   All rights reserved.
 */
require_once('./includes/master.inc.php');
require_once('./functions.statistics.php');
$Auth->requireUser();

if (isset($_GET['do'])) {
    if ($_GET['do'] == 'events') {
        DisplayHeader('stats', 'events');
        require_once('./subpages/view_stats/events.php');
    } else if ($_GET['do'] == 'domains') {
        DisplayHeader('stats', 'domains');
        require_once('./subpages/view_stats/domains.php');
    } else if ($_GET['do'] == 'useragents') {
        DisplayHeader('stats', 'useragents');
        require_once('./subpages/view_stats/useragents.php');
    } else if ($_GET['do'] == 'referrers') {
        DisplayHeader('stats', 'referrers');
        require_once('./subpages/view_stats/referrers.php');
    } else {
        DisplayHeader('stats', 'events');
        require_once('./subpages/view_stats/events.php');
    }
} else {
    DisplayHeader('stats', 'events');
    require_once('./subpages/view_stats/events.php');
    DisplayFooter();
}
?>
